home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / 8bit / cislib_a / chrflp.doc < prev    next >
Text File  |  1995-04-22  |  3KB  |  99 lines

  1.  
  2.          CHRFLP Font Flipper
  3.  
  4.        Bill Aycock [76703,4061]
  5.  
  6. CHRFLP is an ML subroutine for flipping
  7. between several character sets (fonts)
  8. at regular intervals. You can use as
  9. many fonts as you want, as long as you
  10. have enough room -- each font takes
  11. up 1024 bytes (that's four pages).
  12. The fonts are flipped regularly by a
  13. short interrupt routine called by one
  14. of the software timers -- you control
  15. the speed. Your BASIC program will
  16. continue to run while the character
  17. sets change.
  18.  
  19. The sample program is pretty basic,
  20. but it shows what you can do. Before
  21. the routine can be used, it must be
  22. placed in the infamous Page Six. (Note
  23. that the assembler code is included so
  24. you can move the routine elsewhere if
  25. desired.)
  26.  
  27. You also need to set up your alternate
  28. fonts. The sample program reserves
  29. enough space under RAMTOP for four
  30. fonts, then loads them from disk. Note:
  31. the font loader here is S-L-O-W! but
  32. it's easy to understand (and it was
  33. really quick to write! :-)
  34.  
  35. Remember when you're setting up your
  36. fonts that they MUST START ON AN EVEN
  37. PAGE BOUNDARY! The standard ROM font
  38. starts on page 224 (address $E000).
  39.  
  40. To make things easier to understand, I
  41. set up two variables as constants.
  42. SETUP has the value 1545, and is the
  43. address to call the setup routine.
  44. CHRFLP has the value 1577; this is the
  45. entry point for the main routine.
  46.  
  47. Before you start flipping fonts, do a
  48. USR(SETUP). After that, the routine is
  49. controlled with USR calls to CHRFLP.
  50. The format for the USR call is:
  51.  
  52.   X=USR(CHRFLP,sp,set1,set2[,set3...])
  53.  
  54. where:
  55.  
  56.  CHRFLP is the address of the ML
  57.         control routine.
  58.  sp is the speed to flip fonts - this
  59.         can be from 1 to 255, with 1
  60.         being the fastest.
  61.  set1 is the HIGH BYTE (MSB) of the
  62.         address of your first font.
  63.  set2 is the HIGH BYTE (MSB) of the
  64.         address of your second font.
  65.  set3 is for the third font...
  66.  
  67. You can use as many fonts as you like,
  68. within reason. Just add the high bytes
  69. of their addresses to the list. If you
  70. want to include the normal ROM font,
  71. just include the number 224 in the
  72. list.
  73.  
  74. When you've finished, just call the
  75. routine without any parameters at all:
  76.  
  77.             X=USR(CHRFLP)
  78.  
  79. and the flipping will stop. After you
  80. do this, you can switch to whichever
  81. font you want by POKEing its MSB into
  82. the character set base register:
  83.  
  84.             POKE 756,224
  85.  
  86. will restore the standard font, but
  87. you can replace the 224 with the MSB
  88. of another font if you wish.
  89.  
  90.  
  91.  
  92. That's the basics. Study the sample
  93. program, try it out, and if you have
  94. any questions be sure to leave me a
  95. message!
  96.  
  97.                       Bill Aycock
  98.  
  99. ⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪